package com.appkubes.mall.restful.application.admin.binding.service.impl;

import com.appkubes.mall.core.entity.MallAdminBinding;
import com.appkubes.mall.core.service.impl.BaseMallAdminBindingServiceImpl;
import com.appkubes.mall.restful.application.admin.binding.service.AdminBindingService;
import org.springframework.stereotype.Service;

/**
 * @Author: Rongjie
 * @Date: 2020/3/1
 * @Description:
 */
@Service
public class AdminBindingServiceImpl extends BaseMallAdminBindingServiceImpl implements AdminBindingService {
    @Override
    public Boolean bindPid(String adminKey, String pid) {
        MallAdminBinding adminBinding = this.getById(adminKey);
        if (adminBinding != null) {
            adminBinding.setTaobaoPid(pid);
            return this.updateById(adminBinding);
        }
        return false;
    }
}
